package org.cheniy.domain.activity.model.aggregate;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.cheniy.domain.activity.model.entity.ActivityOrderEntity;
import org.cheniy.domain.activity.model.valobj.OrderStateVO;

/**
 * @author cheniy
 * @description 下单聚合对象-【订单构建成功和用户次数加1为一个事务，可能出现错误（outBusinessNo重复，用户不存在等）】
 * @create 2025/3/16 22:22
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CreateQuotaOrderAggregate {

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 活动ID
     */
    private Long activityId;

    /**
     * 增加；总次数
     */
    private Integer totalCount;

    /**
     * 增加；日次数
     */
    private Integer dayCount;

    /**
     * 增加；月次数
     */
    private Integer monthCount;

    /**
     * 活动订单实体
     */
    private ActivityOrderEntity activityOrderEntity;

    public void setOrderState(OrderStateVO orderState) {
        this.activityOrderEntity.setState(orderState);
    }


}
